function open_dialog(id) {
    var fw = $(window).width().toString().replace("px", "");
    var fh = $(window).height().toString().replace("px", "");
    var container = $("#" + id);
    var block = $(container).find(".spec_block");
    if ($(block).size() > 0) {
        var bw = $(block).width().toString().replace("px", "");
        var ml = ((fw - bw) / 2);
        $(block).css({"margin-left": ml + "px"});
    }
    $(container).fadeIn("500");
    return;
}
function close_dialog(id) {
    var block = $("#" + id);
    $(block).fadeOut("500");
    return;
}